/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.resource.service;

import com.lczyfz.istep.common.persistence.Page;
import com.lczyfz.istep.common.service.CrudService;
import com.lczyfz.istep.modules.resource.dao.ResourceFileDao;
import com.lczyfz.istep.modules.resource.entity.ResourceFile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 课件-课程中间表Service
 * @author dh
 * @version 2017-02-21
 */
@Service
@Transactional(readOnly = true)
public class ResourceFileService extends CrudService<ResourceFileDao, ResourceFile> {


	public ResourceFile get(String id) {
		return super.get(id);
	}
	
	public List<ResourceFile> findList(ResourceFile resourceFile) {
		return super.findList(resourceFile);
	}
	
	public Page<ResourceFile> findPage(Page<ResourceFile> page, ResourceFile resourceFile) {
		return super.findPage(page, resourceFile);
	}

	@Transactional(readOnly = false)
	public void save(ResourceFile resourceFile) {
		super.save(resourceFile);
	}
	@Transactional(readOnly = false)
	public void update(ResourceFile resourceFile) {
		super.save(resourceFile);

	}
	@Transactional(readOnly = false)
	public void delete(ResourceFile resourceFile) {
		super.delete(resourceFile);
	}

	public List<ResourceFile> getMaterialsByCoursewareId(ResourceFile resourceFile)
	{
		return dao.getMaterialsByCoursewareId(resourceFile);
	}


}